<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
    <ul>
        <!--v-for:循环遍历指令,遍历的过程中生成当前元素-->
        <li v-for="name in arr">{{name}}</li>
    </ul>

    <p v-for="name in arr">{{name}}</p>
    <h1 v-for="name in arr">{{name}}</h1>

    <p v-for="p in persons">名字:{{p.name}},年龄:{{p.age}},类型:{{p.type}}</p>

    <table border="1">
        <caption>英雄列表</caption>
        <tr><th>名字</th><th>年龄</th><th>类型</th></tr>

        <tr v-for="p in persons" align="center">
            <td>{{p.name}}</td>
            <td>{{p.age}}</td>
            <td>{{p.type}}</td>
        </tr>
    </table>

</div>

<script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>

<script>
    let v=new Vue({
        el:"div",
        data:{
            arr:["刘备","关羽","张飞","诸葛亮","孙尚香"],

            persons:[{name:"墨菲特",age:"888",type:"坦克"},{name:"巴菲特",age:"82",type:"股神"},{name:"莫菲特",age:"28",type:"肉装股神"}]
        },
        methods:{

        }
    })

</script>
</body>
</html>